<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding:0;
            margin: 0;
        }
        /*让容器的高度和宽度充满全屏*/
        html,body{
            width: 100%;
            height: 100%;
        }
        body{
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            background-color: pink;
        }
        .heart{
            width: 200px;
            height: 200px;
            background-color: red;
            position: relative;
            transform: rotate(45deg);/*顺时针旋转45度*/
            animation: heart-bit 1s alternate infinite;
            box-shadow: 0 0 30px red;

        }
        .heart::before{
            content: "";
            width: 200px;
            height: 100px;
            background-color: red;
            position: absolute;
            top: -99px;
            left: 0;
            box-shadow: 0 0 30px red;
            border-radius: 100px 100px 0 0;
        }
        .heart::after{
            content: "";
            width: 100px;
            height: 200px;
            background-color: red;
            position: absolute;
            left: -99px;
            border-radius: 100px 0 0 100px;
            box-shadow: 0 0 30px red;
        }
        @keyframes heart-bit {
            0%{
                 scale:0.6;

            }
            100%{
                scale:1.4;
            }

        }
        p{
            animation: heart-bit 1s alternate infinite;
            position: fixed;
            clear: both;
        }
    </style>
</head>
<body>

<div class="heart"></div>
<p>我的心</p>
</body>
</html>